package com.movisol.messenger.views.controls;

import java.text.SimpleDateFormat;
import java.util.Date;

import android.content.Context;
import android.graphics.RectF;
import android.view.LayoutInflater;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.movisol.messenger.R;

public class ChatMessageDate extends LinearLayout{
	
	private Date date;
	private LinearLayout layout;
	private String stringDate;
	private final TextView tvDate;
	
	public ChatMessageDate(Context context, Date date)
	{
		super(context);
		this.date = date;
		
		String infService = Context.LAYOUT_INFLATER_SERVICE;
		LayoutInflater li = (LayoutInflater)context.getSystemService(infService);
		li.inflate(R.layout.chatmessagedate, this, true);
		SimpleDateFormat sdf = new SimpleDateFormat("d MMMMM yyyy");
		stringDate = sdf.format(date);
		
		tvDate = (TextView) findViewById(R.id.chatMessageDate);
		tvDate.setText(stringDate);
		RectF r = new RectF();
		

		
	}

	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	public LinearLayout getLayout() {
		return layout;
	}

	public void setLayout(LinearLayout layout) {
		this.layout = layout;
	}

	public String getStringDate() {
		return stringDate;
	}

	public void setStringDate(String stringDate) {
		this.stringDate = stringDate;
	}
	
	
	

}
